3.5 \(\int \frac {\cos (a+b x^2)}{x} \, dx\)

Optimal. Leaf size=25 \[ \frac {1}{2} \cos (a) \text {Ci}\left (b x^2\right )-\frac {1}{2} \sin (a) \text {Si}\left (b x^2\right ) \]

[Out]

1/2*Ci(b*x^2)*cos(a)-1/2*Si(b*x^2)*sin(a)

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3378, 3376, 3375} \[ \frac {1}{2} \cos (a) \text {CosIntegral}\left (b x^2\right )-\frac {1}{2} \sin (a) \text {Si}\left (b x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]/x,x]

[Out]

(Cos[a]*CosIntegral[b*x^2])/2 - (Sin[a]*SinIntegral[b*x^2])/2

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps

\begin {align*} \int \frac {\cos \left (a+b x^2\right )}{x} \, dx &=\cos (a) \int \frac {\cos \left (b x^2\right )}{x} \, dx-\sin (a) \int \frac {\sin \left (b x^2\right )}{x} \, dx\\ &=\frac {1}{2} \cos (a) \text {Ci}\left (b x^2\right )-\frac {1}{2} \sin (a) \text {Si}\left (b x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 24, normalized size = 0.96 \[ \frac {1}{2} \left (\cos (a) \text {Ci}\left (b x^2\right )-\sin (a) \text {Si}\left (b x^2\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]/x,x]

[Out]

(Cos[a]*CosIntegral[b*x^2] - Sin[a]*SinIntegral[b*x^2])/2

________________________________________________________________________________________

fricas [A]  time = 0.88, size = 29, normalized size = 1.16 \[ \frac {1}{4} \, {\left (\operatorname {Ci}\left (b x^{2}\right ) + \operatorname {Ci}\left (-b x^{2}\right )\right )} \cos \relax (a) - \frac {1}{2} \, \sin \relax (a) \operatorname {Si}\left (b x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x,x, algorithm="fricas")

[Out]

1/4*(cos_integral(b*x^2) + cos_integral(-b*x^2))*cos(a) - 1/2*sin(a)*sin_integral(b*x^2)

________________________________________________________________________________________

giac [A]  time = 0.42, size = 21, normalized size = 0.84 \[ \frac {1}{2} \, \cos \relax (a) \operatorname {Ci}\left (b x^{2}\right ) - \frac {1}{2} \, \sin \relax (a) \operatorname {Si}\left (b x^{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x,x, algorithm="giac")

[Out]

1/2*cos(a)*cos_integral(b*x^2) - 1/2*sin(a)*sin_integral(b*x^2)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 22, normalized size = 0.88 \[ \frac {\Ci \left (b \,x^{2}\right ) \cos \relax (a )}{2}-\frac {\Si \left (b \,x^{2}\right ) \sin \relax (a )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)/x,x)

[Out]

1/2*Ci(b*x^2)*cos(a)-1/2*Si(b*x^2)*sin(a)

________________________________________________________________________________________

maxima [C]  time = 1.14, size = 43, normalized size = 1.72 \[ \frac {1}{4} \, {\left ({\rm Ei}\left (i \, b x^{2}\right ) + {\rm Ei}\left (-i \, b x^{2}\right )\right )} \cos \relax (a) + \frac {1}{4} \, {\left (i \, {\rm Ei}\left (i \, b x^{2}\right ) - i \, {\rm Ei}\left (-i \, b x^{2}\right )\right )} \sin \relax (a) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x,x, algorithm="maxima")

[Out]

1/4*(Ei(I*b*x^2) + Ei(-I*b*x^2))*cos(a) + 1/4*(I*Ei(I*b*x^2) - I*Ei(-I*b*x^2))*sin(a)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.04 \[ \frac {\cos \relax (a)\,\mathrm {cosint}\left (b\,x^2\right )}{2}-\frac {\sin \relax (a)\,\mathrm {sinint}\left (b\,x^2\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x^2)/x,x)

[Out]

(cos(a)*cosint(b*x^2))/2 - (sin(a)*sinint(b*x^2))/2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (a + b x^{2} \right )}}{x}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)/x,x)

[Out]

Integral(cos(a + b*x**2)/x, x)

________________________________________________________________________________________